import multiprocessing
import time


def excutor(t):
    time.sleep(t)
    print('this is %s' % t)
    return t


if __name__ == '__main__':
    # set multiprocessing CPU and start
    mp = multiprocessing.Pool(multiprocessing.cpu_count())
    result = mp.apply_async(excutor, args=(2,))

    mp.close()
    mp.join() # block subprocessing

    print(result.get()) # get result of return
    print('The end')
